import java.util.Comparator;

public class ClientObjComparator implements Comparator<ClientObj>
{
	public int compare(ClientObj a, ClientObj b)
	{
		if(a.priority < b.priority)
		{
			return 1;
		}
		else if (a.priority > b.priority)
		{
			return -1;
		}
		else
		{
			if(a.timestamp < b.timestamp)
			{
				return -1;
			}
			else
			{
				return 1;
			}
		}
	}
}
